package com.jie.langlangmall.service.impl;

import com.jie.langlangmall.mapper.UmsMemberLevelMapper;
import com.jie.langlangmall.model.UmsMemberLevel;
import com.jie.langlangmall.model.UmsMemberLevelExample;
import com.jie.langlangmall.service.UmsMemberLevelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author Jie
 * @Date 2024/11/24
 * @Email 3217998214@qq.com
 * @Description 会员等级
 */
@Service
public class UmsMemberLevelServiceImpl implements UmsMemberLevelService {

    @Autowired
    private UmsMemberLevelMapper memberLevelMapper;

    /**
     * 查询所有会员等级
     *
     * @param defaultStatus
     * @return
     */
    @Override
    public List<UmsMemberLevel> list(Integer defaultStatus) {
        UmsMemberLevelExample example = new UmsMemberLevelExample();
        example.createCriteria().andDefaultStatusEqualTo(defaultStatus);
        return memberLevelMapper.selectByExample(example);
    }
}
